﻿--[[
   @brief    这里定义社交对外提供的service 名称
   @author   rickonzhang
   @version  1.0
   @date     2016-07-18
--]]


-- e.g: ---------------------------------------------------------------------------------------
-- 打开社交搜索面板,并且定位到好友搜索页面
-- 1. lua中调用
-- comm_service.call_service(social_services.open_search_pannel, {tab = "friend_search"});
-- 2. js中调用
-- comm_service.call_service('i_service_social_open_search_pannel', {tab = "friend_search"});
-- e.g: ---------------------------------------------------------------------------------------

social_services = 
{
    i_service_social_open_qq_friend_panel = "i_service_social_open_qq_friend_panel";  -- param {none;}
    i_service_social_open_game_friend_panel = "i_service_social_open_game_friend_panel"; --param {none;}
    i_service_social_open_search_pannel = "i_service_social_open_search_pannel";   --param {tab:"group_search" or "friend_search"} 打开搜索面板，
                                                                  --定位到好友搜索或者群搜索

    i_service_social_add_friend = "i_service_social_add_friend";  --param {friend_id:xxx, relationship: 1 -- qq好友， 2--游戏好友， 3--未知}
    i_service_social_get_favor_groupchat_flag = "i_service_social_get_favor_groupchat_flag"; --param {group_id}, 返回参数{group_id:xx, b_favor:0 or 1}
    i_service_social_set_favor_groupchat_flag = "i_service_social_set_favor_groupchat_flag"; --param {group_id:xx, b_favor:0 or 1} /* 0:不收藏，1收藏 */

    i_service_social_save_remote_cfg = 'i_service_social_save_remote_cfg';  -- 保存远程配置, 参数{key = "xxx", value = "xxx", save_at_once: 0 or 1}, 
                                        -- key value 必须是字符串， 
                                        -- save_at_once是否立即保存的后台服务器 1 -- 立即保存， 默认可以不填(退出tgp时保存)
    i_service_social_get_remote_cfg = 'i_service_social_get_remote_cfg'; -- 读取远程配置 参数{key = "xxx"}, 返回值：nil or value_str
    i_service_social_is_my_friend = 'i_service_social_is_my_friend'; -- 判断是否自己好友  参数{friend_id:"xx"} 返回值{is_my_friend: true or false}
    i_service_social_get_my_info = 'i_service_social_get_my_info'; --获取自己的相关信息，具体参考返回值，很多项 
    i_service_social_open_person_center = 'i_service_social_open_person_center'; -- 打开个人中心 参数{friend_id:"xxx", tab_index:"base_info" or "post" or "reply"}
                                                                                 -- 个人中心的子table打开参数如下：
                                                                                 -- tab_index 参数可以不填，默认打开个人中心的基本信息base_infotab, post:帖子 reply:回复
    i_service_social_begin_talk_with_friend = 'i_service_social_begin_talk_with_friend'; -- 与好友发起聊天 {friend_id:"xxx"}
    i_service_social_begin_talk_with_group = 'i_service_social_begin_talk_with_group'; -- 与好友发起聊天 {group_id:"xxx"}


    i_service_social_open_live_room_talk = 'i_service_social_open_live_room_talk'; -- 打开话题房间聊天窗口 {group_id : "xxx"}
    i_service_social_open_common_room_talk = 'i_service_social_open_common_room_talk'; --打开通用话题房间 {game_id:xx, room_id:xxx}

    i_service_social_get_common_topic_js_info = 'i_service_social_get_common_topic_js_info'; -- 获取common_topic_info.js的内容, 返回{js_info:"xxx"}

    i_service_social_open_game_detail_web_page = 'i_service_social_open_game_detail_web_page'; -- 打开游戏详情页 参数：{game_id:xxxx}

    i_service_social_get_friend_playing_game = 'i_service_social_get_friend_playing_game'; --获取好友正在玩游戏的信息 参数: {friend_id:"xxxx"}
                                                                                           -- 返回值 {result:true or false, game_id:xxxx, status:xxxx}
    i_service_social_open_game_web_page = 'i_service_social_open_game_web_page'; --打开游戏助手或者详情页 { game_id:xxxx,
       
                                                                                 -- page = 0 已经安装打开助手页，未安装打开详情页; 1 -- 打开详情页; 2 -- 打开助手}
    i_service_social_get_all_game_id_list = 'i_service_social_get_all_game_id_list';  --返回所有游戏列表 [{},{},....{}]

    i_service_social_get_history_message = 'i_service_social_get_history_message'; -- 获取20条历史消息 {id:xxx群组或者好友id, type:"friend" or "group"
                                                                                    -- pos:获取历史消息的起始位置，}
                                                                                    -- 返回值{result: 0 返回信息 or 1 等待广播, id:"xx", message_list: [消息列表] }

    i_service_get_friend_played_game_list = 'i_service_get_friend_played_game_list'; --获取好友玩过的游戏列表（不包含好友已经隐藏的） param {friend_id:xx}

    i_service_is_game_id_in_friend_played_game_list = 'i_service_is_game_id_in_friend_played_game_list'; --是否好友玩过游戏 {friend_id:xx, game_id:xxx} 返回 {is_played: true or false}
};

social_broadcast = 
{
    i_broadcast_social_get_remote_cfg_result =     'i_broadcast_social_get_remote_cfg_result'; --远程配置获取成功广播, 数据格式 {{key, value}, {key, value}};
    i_broadcast_social_open_common_room_talk = 'i_broadcast_social_open_common_room_talk'; -- 打开通用话题房间聊天窗口 {group_id : "xxx"}
    i_broadcast_social_live_room_info_changed = 'i_broadcast_social_live_room_info_changed'; --话题房间人数信息变化: {room_info:房间信息}
    i_broadcast_social_on_get_history_message = 'i_broadcast_social_on_get_history_message'; --{id:"xx", message_list: [消息列表] }
    i_broadcast_social_update_game_status = 'i_broadcast_social_update_game_status';  --{friend_id:"xxx"} 表示可能有游戏状态更新(游戏隐藏功能使用到了)
};
